import React, { useState } from 'react'

export default function Child() {
    const [num, setNum] = useState(0)
    return (
        <div>
            {num}
            <button onClick={() => setNum(num + 1)}>+</button>
        </div>
    )
}
